package cn.ava.ymcc.feign;

import cn.ava.ymcc.feign.fallback.CourseClientFallbackFactory;
import cn.ava.ymcc.feign.fallback.CourseUserLearnFeignClientFallbackFactory;
import cn.ava.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-course",fallbackFactory = CourseClientFallbackFactory.class)
public interface CourseFeignClient {

    @RequestMapping(value="/course/info/{courseIds}",method= RequestMethod.GET)
    JSONResult info(@PathVariable String courseIds);

    @RequestMapping(value = "/course/{id}",method = RequestMethod.GET)
    JSONResult get(@PathVariable("id")Long id);

}
